package goods

import (
	"server/lib/Imartini"
	"server/web/handler/shop/admin/auth"
)

var base = "admin/goods"
var route = [][]interface{}{
	{"admin/goods/index", "GET", "", auth.Auth, index},
	{"admin/goods/addgoods", "POST", "/addgoods", auth.Auth, addgoods},
	{"admin/goods/goodsinfo", "GET", "/goodsinfo", auth.Auth, goodsinfo},
	{"admin/goods/class", "GET", "/class", auth.Auth, class},
	{"admin/goods/delclass", "GET", "/delclass/:id", auth.Auth, delclass},
	{"admin/goods/addclass", "POST", "/class", auth.Auth, addclass},
	{"admin/goods/classinfo", "GET", "/class/:id", auth.Auth, getclassinfo},
	{"admin/goods/updateclass", "POST", "/updateclass/:id", auth.Auth, updateclass},
	{"admin/goods/format", "GET", "/format", auth.Auth, format},
	{"admin/goods/addformat", "POST", "/format", auth.Auth, addformat},
	{"admin/goods/delformat", "GET", "/delformat/:id", auth.Auth, delformat},
	{"admin/goods/updateformat", "POST", "/updateformat/:id", auth.Auth, updateformat},
	{"admin/goods/formatinfo", "GET", "/formatinfo/:id", auth.Auth, getformatinfo},
	{"admin/goods/getformat", "GET", "/getformat/:classid", auth.Auth, getformat},
	{"admin/goods/attr", "GET", "/attr", auth.Auth, attr},
}

func init() {
	Imartini.M.AddIroute(base, route)
	// Imartini.M.AddRoute("GET", "/js/", http.FileServer(http.Dir("/var/www/js/")))
	// log.Println(Imartini.M.Iroute)
}
